'use strict';


module.exports = app => {
  const { router, controller } = app;// 结构
  const url = '/api/admin/mall/goods/'; // 开启路由前缀

  router.resources(`${url}`, controller.admin.mallGoods);
  // 下架商品
  router.post(`${url}:id/off`, controller.admin.mallGoods.shelve);
  // 上架商品
  router.post(`${url}:id/on`, controller.admin.mallGoods.shelves);

};
